<template>
  <div class="header">
    <div class="header-left">
      <i class="iconfont icon-fanhui"></i>
    </div>
    <div class="header-input">
      <i class="iconfont icon-sousuo"></i>
      <span>输入城市/景点/游玩主题</span>
    </div>
    <router-link to="/city">
      <div class="header-right">
        <span>{{city}}</span>
        <i class="iconfont icon-jiantouxia"></i>
      </div>
    </router-link>
  </div>
</template>

<script>
import {mapState} from 'vuex'
export default {
  computed: {
    ...mapState(['city'])
  }
}
</script>

<style lang='stylus' rel='stylesheet/stylus' scoped>
  @import '~styles/varibles.styl'
  @import '~styles/mixins.styl'

  .header
    display flex
    line-height $headerHeight
    background $bgColor
    color #fff
    .header-left
      float left
      width .8rem
      text-align center
      .icon-fanhui
        font-size .3rem
    .header-input
      flex 1
      height .6rem
      line-height .6rem
      margin-top .14rem
      padding-left .3rem
      background #fff
      color #ccc
      border-radius 4px
      .icon-sousuo
        font-size .3rem
    .header-right
      float right
      min-width 1.12rem
      padding 0 .1rem
      color #fff
      text-align center
      // ellipsis()
      .icon-jiantouxia
        margin-left .04rem
        font-size .24rem
</style>
